<!--
 * @Description:
 * @Author: Ambrose
 * @Date: 2022-01-18 15:43:06
 * @LastEditTime: 2024-06-24 12:45:24
 * @LastEditors: Ambrose
-->
<template>
  <el-card class="table">
    <el-row :gutter="20" class="header"> </el-row>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column
        :width="item.width"
        :prop="item.prop"
        :label="item.label"
        v-for="(item, index) in options"
        :key="index"
      >
      </el-table-column>
    </el-table>
  </el-card>
</template>

<script setup>
import { ref } from 'vue'
import { options } from './options'
import axios from 'axios'

const tableData = ref([])

const init = async () => {
  const res = await axios.get('http://127.0.0.1:8090/total')
  tableData.value = res.data.data
}

init()
</script>

<style lang="scss" scoped>
.header {
  padding-bottom: 16px;
  box-sizing: border-box;
}

::v-deep .el-input__suffix {
  align-items: center;
}
.table {
  margin-top: 30px;
}
</style>
